package com.dalin.platform.etl.action;

import java.util.HashMap;
import java.util.Map;

import com.dalin.framework.action.StrutsTwoAction;
import com.dalin.platform.etl.service.EtlService;
import com.dalin.platform.etl.vo.EtlColumnViewVo;
/*****************************************************************************
 * @content: 类信息                                                   *
 * @author : 那建林                                                                                                                                 *
 * @crtDate: 2010-12-06 19:58:36                                                     *
 * @modDate: 2010-12-06 19:58:36                                                     *
 * @version: 1.00                                                           *
 ****************************************************************************/
public class ColumnViewAddModAction extends StrutsTwoAction{
    private EtlService etlService; // 
    private EtlColumnViewVo vo; // 





    public String execute() throws Exception {
        super.printInfo("", "===== this action begin");
        try {
        	 Long columnViewId = vo.getColumnViewId();
        	 if (columnViewId == null || columnViewId == 0) {
        		 columnViewId = etlService.addEtlColumnView(vo);
             } else {
             	etlService.modifyEtlColumnView(vo);
             }
        	 Map m = new HashMap();
        	 m.put("info", "保存成功");
        	 m.put("columnViewId", columnViewId);
        	 //setResContent(true, m);
        } catch (Exception e) {
        	e.printStackTrace();
        	setResContent(e);
        }
        super.printInfo("", "===== this action end");
        return null;
    }


    public EtlService getEtlService() {
		return etlService;
	}


	public void setEtlService(EtlService etlService) {
		this.etlService = etlService;
	}

	public EtlColumnViewVo getVo() {
        return vo;

    }

    public void setVo(EtlColumnViewVo vo) {
        this.vo = vo;

    }
}
